/**
 * Created by Baggio on 2018-9-17.
 */
$(function () {
    $("#form-member-add").validate({
        rules: {},
        onkeyup: false,
        focusCleanup: true,
        success: "valid",
        submitHandler: function (form) {
            $("#form-member-add").ajaxSubmit({
                cache: true,
                type: 'POST',
                data: $('#form-member-add').serialize(),
                url: '/certificateBatch/modifyCertificateBatch.html',
                //async:false,
                dataType: 'json',
                success: function (data) {
                    if (data.code != 1) {
                        layer.msg(data.msg, {icon: 5, time: 1000});
                        console.log(data.msg);
                        return;
                    }
                    layer.msg('操作成功!', {icon: 6, time: 1000}, function () {
                        window.parent.location.reload();
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                    })
                }
            })
        }
    });
});